package cn.edu.gzhu.workOrderManagement.service;

import cn.edu.gzhu.workOrderManagement.pojo.dto.workOrder.*;
import cn.edu.gzhu.workOrderManagement.pojo.dto.workOrderHistory.WorkOrderHistoryListDto;
import cn.edu.gzhu.workOrderManagement.pojo.entity.User;
import cn.edu.gzhu.workOrderManagement.pojo.vo.WorkOrderChartAnyVo;
import cn.edu.gzhu.workOrderManagement.pojo.vo.WorkOrderDetailVo;
import cn.edu.gzhu.workOrderManagement.pojo.vo.WorkOrderListVo;
import cn.edu.gzhu.workOrderManagement.pojo.vo.WorkOrderStatusAnyVo;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

public interface WorkOrderService {

    /**
     * 批量创建工单
     * @param workOrderCreateDtos
     * @return
     */
    Boolean createWorkOrder(List<WorkOrderCreateDto> workOrderCreateDtos);

    /**
     * 更新工单
     * @param workOrderUpdateDto
     * @return
     */
    Boolean updateWorkOrder(String username, WorkOrderUpdateDto workOrderUpdateDto);

    /**
     * 批量删除工单
     * @param uuids
     * @return
     */
    Boolean deleteWorkOrder(List<String> uuids);

    /**
     * 工单分页查询
     * @return
     */
    IPage<WorkOrderListVo> listWorkOrder(WorkOrderListDto workOrderListDto);

    IPage<WorkOrderListVo> listHistoryWorkOrder(String username,WorkOrderHistoryListDto workOrderHistoryListDto);

    /**
     * 重诉工单
     * @param workOrderRepeatDto
     * @return
     */
    Boolean repeatWorkOrder(WorkOrderRepeatDto workOrderRepeatDto);

    /**
     * 总部商务修改工单
     * @param workOrderBusUpdateDto
     * @return
     */
    Boolean busUpdate(String username,WorkOrderBusUpdateDto workOrderBusUpdateDto);

    /**
     * 根据uuid获取工单详情
     * @param uuid
     * @return
     */
    WorkOrderDetailVo getWorkOrderDetail(String uuid);

    IPage<WorkOrderListVo> fuzzySearch(FuzzySearchDto fuzzySearchDto);

    /**
     * 根据传入的日期/月份，统计不同状态的工单数量
     */
    List<WorkOrderStatusAnyVo> getWorkOrderStatusAnalysis(String date);

    /**
     * 根据传入的日期/月份，统计不同类型的工单数量
     */
    List<WorkOrderStatusAnyVo> getWorkOrderTypeAnalysis(String date);

    /**
     * 根据传入的数量，统计近n个月的工单数量
     */
    List<WorkOrderChartAnyVo> getWorkOrderChartAnalysis(Integer month);
}
